package com.contactsconverter.component;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.contactsconverter.utils.CTEventUtil;
import com.contactsconverter.utils.CTUtils;

public class CTEventBroadcastReceiver extends BroadcastReceiver{

	Context context;
	@Override
	public void onReceive(Context context, Intent intent) {
		this.context = context;
		CTEventUtil ctEventUtil = new CTEventUtil(context);
	
		Log.e("DIFSON", "CTUtils.isConnected(context) : "+CTUtils.isConnected(context));
		if(CTUtils.isConnected(context))
        {
		   ctEventUtil.onGetEvent();
        }
		else{
			CTUtils.savePreference(CTUtils.EVENT_NETWORK_MODE, "12", context);
		}
	}
		



	
}
